Oracle HCM
Prerequisites
IBM Technologies
- IBM watsonx Orchestrate with the "Builder" role
External Technologies
-
Oracle HCM Instance
Including an Oracle HCM user account with:
- Username/Password
- API access with ability to perform GET and PATCH calls to "workers" API, and GET calls to "publicWorkers" API
- The ability to create Workers
-
Custom code engine to perform the patch function
Custom Code RequiredCustom code is required to update a manager via a PATCH call due to Oracle HCM's specific PATCH parameter requirements and JSON response structure. watsonx Orchestrate cannot natively parse these unique IDs from the Oracle HCM JSON response, as they are embedded within the string of the returned URL property, rather than being returned as individual properties.
Two unique IDs are required as input parameters for the "Update a Manager" PATCH call:
workersUniqID
andassignmentsUniqID
. Refer to the supporting Oracle documentation for more details. In the Oracle HCM response, the URL properties contain these unique IDs as part of the string, but only the unique ID portion is needed for the PATCH call to function correctly. Since watsonx Orchestrate cannot isolate portions of string properties to pass as output variables, it cannot directly use them as input parameters for the PATCH call.To resolve this, custom code is used. This code takes user input via watsonx Orchestrate's AI assistant, parses the Oracle HCM JSON response, and extracts the necessary unique IDs. These IDs are then retained as variables to be passed as parameters in the PATCH call, enabling the proper update of a manager.
Quickstart
This "Quickstart" provides an importable watsonx assistant with two custom extensions to provide this functionality within watsonx Orchestrate AI Assistant and/or watsonx Assistant for Oracle HCM. The below guide is how to build and configure the assistant.
Overview
- Download and Import the prebuilt watsonx Orchestrate AI Assistant
- Download and Import the OracleHCM Skill/Custom Extensions into watsonx Orchestrate AI Assistant
- Stage the "Apply Manager Update Patch" Custom Code Environment
- Stage Oracle HCM and the watsonx Orchestrate AI Assistant
- Configure Action Step Extensions
Download and Import the prebuilt watsonx Orchestrate AI Assistant
- Download the zip file for the Assistant
- Upload the zip file to your watsonx Orchestrate Assistant (If no assistant exists, create one. Feel free to name it anything such as "AskHR Bot")
- Go to Assistant settings
- Click the "Download/Upload" box
- Click Upload
- Navigate to the downloaded zip file from the previous step
- Click "Upload"
Download and Import the OracleHCM Skill/Custom Extensions into watsonx Orchestrate AI Assistant
-
Download the watsonx Orchestrate custom extension Oracle - Get Managers and Employees
-
Modify the API spec for
Oracle HCM
custom extension and replace "YOUR_INSTANCE_HERE" with your Oracle HCM instance name"servers": [
{
"url": "https://YOUR_INSTANCE_HERE.oraclecloud.com/",
"description": "HCM API server"
}
] -
Upload the "Oracle - Get Managers and Employees" custom extension
- Go to integrations
- Click "Build Custom Extension"
- Click "Next"
- Name the extension "Oracle - Get Managers and Employees"
- Navigate to the downloaded json file from the previous step
- Click "Finish"
-
Add and Authenticate the "Oracle - Get Managers and Employees" custom extension
- From your list of extensions under "Integrations, select the created custom extension from above
- Click "Add"
- Click "Add"
- Click "Next"
- Under "Authentication Type," select "Basic Auth"
- Enter your Oracle HCM username and password 7 .Click "Next"
- Click "Finish"
-
Download the watsonx Orchestrate custom extension Apply Manager Update Patch
-
Modify the API spec for
Apply Manager Update Patch
and replace "YOUR_INSTANCE_HERE" with your custom code endpoint URLservers": [
{
"url": "https://YOUR_INSTANCE_HERE/updateManager"
}
] -
Upload the "Apply Manager Update Patch" custom extension
- Go to integrations
- Click "Build Custom Extension"
- Click "Next"
- Name the extension "Apply Manager Update Patch"
- Navigate to the downloaded json file from the previous step
- Click "Finish"
-
Add the "Apply Manager Update Patch" custom extension
- From your list of extensions under "Integrations, select the created custom extension from above
- Click "Add"
- Click "Add"
- Click "Next"
- Click "Finish"
Stage the "Apply Manager Update Patch" Custom Code Environment
-
Create Flask App
- Copy the following code into a new file called "app.py"
from flask import Flask
import requests
from requests.auth import HTTPBasicAuth
import json
app = Flask(__name__)
@app.route('/updateManager/PersonId/<string:PersonId>/managerAssignmentNumber/<string:managerAssignmentNumber>/', methods=['GET'])
def updateManager(PersonId, managerAssignmentNumber):
getWorkerURL = "https://{HOSTNAME}/hcmRestApi/resources/11.13.18.05/workers?q=PersonId=" + PersonId + "&expand=workRelationships.assignments.managers&links=self"
getWorkerHeaders = {
'Content-Type': 'application/vnd.oracle.adf.resourceitem+json',
'REST-Framework-Version': '4',
}
getWorkerResponse = requests.get(getWorkerURL, auth=HTTPBasicAuth('{Username}', '{PASSWORD}'), headers=getWorkerHeaders)
json_getWorkerResponse = getWorkerResponse.json()
href = json_getWorkerResponse['items'][0]['workRelationships']['items'][0]['assignments']['items'][0]['managers']['items'][0]['links'][0]['href']
updateManagerURL = href
updateManagerPayload = json.dumps({
"ActionCode": "MANAGER_CHANGE",
"ManagerAssignmentNumber": managerAssignmentNumber,
"ManagerType": "LINE_MANAGER"
})
updateManagerHeaders = {
'Content-Type': 'application/vnd.oracle.adf.resourceitem+json',
'REST-Framework-Version': '4',
'effective-Of' : 'RangeMode=UPDATE;RangeStartDate=2024-09-18;RangeEndDate=4712-12-31'
}
updateManagerResponse = requests.patch(updateManagerURL, auth=HTTPBasicAuth('{USERNAME}', '{PASSWORD}'), headers=updateManagerHeaders, data=updateManagerPayload)
json_updateManagerResponse = updateManagerResponse.json()
return json_updateManagerResponse
if __name__ == '__main__':
app.run(host='0.0.0.0', port=5000)The code works by taking in the employee's PersonId and the new manager's AssisgnmentNumber. The employee's PersonId is used to make a GET call to obtain the necessary uniqIds which allow us to make the PATCH call and changet their manager. The response of the GET call returns a URL with all the uniqIds included so we simply have to use that URL as the target for the PATCH call to update the manager. The new manager's AssignmentNumber is used in the payload that is passed to make the PATCH Update Manager call. The Flask App returns the response from the PATCH call.
- Fill in the
HOSTNAME
,USERNAME
, andPASSWORD
values from your Oracle HCM instance. - Test the Flask App locally using the following scripts:
python3 -m venv flaskvenv
source flaskvenv/bin/activate
pip install Flask
pip install requests
flask --app app run --debugThis will create a local server where you can test the Flask App based on the route created in app.py. To stop the flaskenv use
deactivate
-
Deploy Flask App to IBM Code Engine
- Follow these instructions to deploy your Flask App to IBM Code Engine: Deploy a Python-Flask web application by using IBM Cloud Code Engine
- Once you have the Flask App deployed, take note of the endpoint that it is hosted at.
-
Add Endpoint to API Spec
- You can now add the endpoint to the API Spec in Steps 5 and 6 of the previous section.
Stage Oracle HCM and the watsonx Orchestrate AI Assistant
- In Oracle HCM, create managers and their direct reports
- For each manager, retain their respective PersonID. This documentation will refer to them as
Manager 1
andManager 2
- Ensure each manager has at least one direct report.
Our assistant assumed the following users and reports in Oracle HCM:
- John Doe (
Manager 1
, PersonID 300000009897423), with direct reports Tom Smith and Alice Brown - Taylor Jones (
Manager 2
, PersonID 300000009928463), with direct report Sam Wiliams
- In the watsonx Orchestrate AI assistant, set the manager context variables. The
ContextManager
variable represents the PersonID of the manager as the Assistant user. This will allow you to switch the context of the user betweenManager 1
andManager 2
- Go to "Actions"
- Under "Variables" select "Created by you"
- Click the "ContextManager" variable
- Set the initial value to the PersonID of your
Manager 1
- Click "Save"
- Update the Names and PersonID's for each manager variable
- Go to "Actions"
- Under "Variables" select "Created by you"
- Click the "Manager1" variable
- Set the initial value to the PersonID of your
Manager 1
- Click "Save"
- Click the "Manager2" variable
- Set the initial value to the PersonID of your
Manager 2
- Click "Save"
Configure Action Steps Extensions
- Navigate to the Assistant actions
- Click "Created by you"
- Click action "Update Manager"
- Select Action Step 5
- Click "Edit Extension"
- Under "Extension," select "Oracle - Get Managers and Employees" from the dropdown
- Under "Operations," select "Get Direct Reports of PersonID"
- Under "Parameters," set "PersonID" to Session Variables > "ContextManager".
- Under "Optional Parameters," set "fields" to an expression
- In the expression, type the following:
assignments.directReports:PersonId,DisplayName
warningThere is a bug in watsonx Orchestrate where you must click and set the optional parameter even if it appears to be set by default in the json. Make sure you do the above step and hit apply anyway.
- Under "Optional Paremeters," set "onlyData" to "True".
warning
This parameter will appear to be set. Click and apply anyway.
- Click "Save"
- Select Action Step 8
- Click "Edit Extension"
- Under "Extension," select "Oracle - Get Managers and Employees" from the dropdown
- Under "Operations," select "Get New Manager's Assignment Number"
- Under "Optional Paremeters," set "q" to an expression
- In the expression, type the following:
"DisplayName=
- After "DisplayName= press the spacebar then type the
$
character. Select "Session Variables" - Select Session Variable "selectedEmployee"
- Type the
"
character - Press the left arrow key three times to direct the text cursor before the "selectedEmployee" variable in Builder
- Press backspace to delete the space between the "selectedEmployee" variable and ""Direct Reports="
- The expression should look like the following (including quotations):
"DisplayName=selectedEmployee"
- Click "Apply"
- Under "Optional Paremeters," set "fields" to expression "PersonID" (replace "assignments:AssignmentNumber" with "PersonID", without quotes)
PersonID
- Click "Apply"
- Under "Optional Paremeters," set "onlyData" to "True".
warning
This parameter will appear to be set. Click and apply anyway.
- Click Apply
- Select Action Step 11
- Click "Edit Extension"
- Under "Extension," select "Oracle - Get Managers and Employees" from the dropdown
- Under "Operations," select "Get New Manager's Assignment Number"
- Under "Optional Paremeters," set "q" to an expression
- In the expression, type the following:
"DisplayName=
- After "DisplayName= press the spacebar then type the
$
character. Select "Action Steps" - Select Action Step Variable "10. Who is the new manager..."
- Type the
"
character - Press the left arrow key three times to direct the text cursor before the "selectedEmployee" variable
- Press backspace to delete the space between the "selectedEmployee" variable and ""Direct Reports="
- The expression should look like the following (including quotations):
"DisplayName=10. Who is the new manager..."
- Click "Apply"
- Under "Optional Paremeters," set "fields" to expression "assignments:AssignmentNumber"
warning
This parameter will appear to be set. Click and apply anyway.
- Under "Optional Paremeters," set "onlyData" to "True".
warning
This parameter will appear to be set. Click and apply anyway.
- Select Action Step 17
- Click "Edit Extension"
- Under "Extension," select "Apply Manager Update Patch" from the dropdown
- Under "Operations," select "Patch manager details using a dynamic path"
- Under "Optional Paremeters," set "path" to an expression
- In the expression, type the following:
"PersonId/
- After "PersonId/ press the spacebar then type the
$
character. Select "Session Variables" - Select Session Variable "selectedPersonId"
- Press the left arrow key two times to direct the text cursor before the "selectedPersonId" variable
- Press backspace to delete the space between the ""PersonId/" and "selectedPersonId" variable
- Click the open space after the "selectedPersonId" variable to move the text curser after the "selectedPersonId" variable
- Type the following:
/managerAssignmentNumber/
- After /managerAssignmentNumber/ press the spacebar then type the
$
character. Select "Session Variables" - Select Session Variable "newManagerAssignmentNumber"
- Press the left arrow key two times to direct the text cursor before the "newManagerAssignmentNumber" variable
- Press backspace to delete the space between the "managerAssignmentNumber/" and "newManagerAssignmentNumber" variable
- 3The expression should look like the following (including quotations):
"PersonId/selectedPersonId/managerAssignmentNumber/newManagerAssignmentNumber"
- Click Apply
You are now ready to test the Assistant.
To assume the role of Manager 1
, type in the assistant "Context switch to manager 1"
To assume the role of Manager 2
, type in the assistant "Context switch to manager 2"
Further Documentation
Oracle Documentation
"Update a Worker Manager" documentation
Oracle HCM API Flow Overview
Each PATCH for "Update an Employee Manager" requires following parameters:
EmployeeID
(Parsed from GET worker call - ID located in the "self" child URL, and returns multiple workers unless a query parameter is used)PeriodOfServiceId
(Using the workersUniqID parameter above, property is directly returned by the GET worker workRelationships call, in the workRelationships child)Worker Assignment
(Using the above 2 parameters, parsed from GET worker workRelationships call - ID located in the in the "assignments" child URL). These requirements accomplish "Transfer an Employee" withPATCH Update a Worker Assignment
Worker Manager
(Using the above 3 parameters returns the workerManagers child). These requirements accomplish "Update a Worker Manager" withPATCH Update a Worker Manager
.
Per the documentation, you must follow the chain of returns from the GET worker call, GET worker workRelationships call, and GET worker assignments call and retain the "uniqId" in the URL to pass to the required parameters for the PATCH calls (Update a Worker Assignment and Update a Worker Manager) API.
Via Manual Curls:
-
Retrieve (GET) the worker details and obtain the manager item link.
# Used to GET worker info and child IDs (workersUniqID, PeriodOfServiceId, assignmentsUniqID)
/hcmRestApi/resources/11.13.18.05/publicWorkers/{PersonId}
# or
/hcmRestApi/resources/11.13.18.05/workers/{PersonId}Example Output
{
"items": [
{
"PersonId": 300000009681193,
"PersonNumber": "19",
"CorrespondenceLanguage": null,
"BloodType": null,
"DateOfBirth": null,
"DateOfDeath": null,
"CountryOfBirth": null,
"RegionOfBirth": null,
"TownOfBirth": null,
"ApplicantNumber": null,
"CreatedBy": "rkswain@in.ibm.com",
"CreationDate": "2024-08-18T08:19:18+00:00",
"LastUpdatedBy": "rkswain@in.ibm.com",
"LastUpdateDate": "2024-08-18T08:25:52.593+00:00",
"links": [
{
"rel": "self",
"href": "https://iavnqy-dev1.fa.ocs.oraclecloud.com:443/hcmRestApi/resources/11.13.18.05/workers/00020000000EACED00057708000110D9320279290000004AACED00057372000D6A6176612E73716C2E4461746514FA46683F3566970200007872000E6A6176612E7574696C2E44617465686A81014B5974190300007870770800000191E387980078",
"name": "workers",
"kind": "item",
"properties": {
"changeIndicator": "ACED0005737200136A6176612E7574696C2E41727261794C6973747881D21D99C7619D03000149000473697A65787000000002770400000002737200116A6176612E6C616E672E496E746567657212E2A0A4F781873802000149000576616C7565787200106A6176612E6C616E672E4E756D62657286AC951D0B94E08B0200007870000000027371007E00020000000178"
}
},
{
"rel": "canonical",
"href": "https://iavnqy-dev1.fa.ocs.oraclecloud.com:443/hcmRestApi/resources/11.13.18.05/workers/00020000000EACED00057708000110D9320279290000004AACED00057372000D6A6176612E73716C2E4461746514FA46683F3566970200007872000E6A6176612E7574696C2E44617465686A81014B5974190300007870770800000191E387980078",
"name": "workers",
"kind": "item"
},
{
"rel": "child",
"href": "https://iavnqy-dev1.fa.ocs.oraclecloud.com:443/hcmRestApi/resources/11.13.18.05/workers/00020000000EACED00057708000110D9320279290000004AACED00057372000D6A6176612E73716C2E4461746514FA46683F3566970200007872000E6A6176612E7574696C2E44617465686A81014B5974190300007870770800000191E387980078/child/addresses",
"name": "addresses",
"kind": "collection"
},
{
"rel": "child",
"href": "https://iavnqy-dev1.fa.ocs.oraclecloud.com:443/hcmRestApi/resources/11.13.18.05/workers/00020000000EACED00057708000110D9320279290000004AACED00057372000D6A6176612E73716C2E4461746514FA46683F3566970200007872000E6A6176612E7574696C2E44617465686A81014B5974190300007870770800000191E387980078/child/citizenships",
"name": "citizenships",
"kind": "collection"
},
{
"rel": "child",
"href": "https://iavnqy-dev1.fa.ocs.oraclecloud.com:443/hcmRestApi/resources/11.13.18.05/workers/00020000000EACED00057708000110D9320279290000004AACED00057372000D6A6176612E73716C2E4461746514FA46683F3566970200007872000E6A6176612E7574696C2E44617465686A81014B5974190300007870770800000191E387980078/child/disabilities",
"name": "disabilities",
"kind": "collection"
},
{
"rel": "child",
"href": "https://iavnqy-dev1.fa.ocs.oraclecloud.com:443/hcmRestApi/resources/11.13.18.05/workers/00020000000EACED00057708000110D9320279290000004AACED00057372000D6A6176612E73716C2E4461746514FA46683F3566970200007872000E6A6176612E7574696C2E44617465686A81014B5974190300007870770800000191E387980078/child/driverLicenses",
"name": "driverLicenses",
"kind": "collection"
},
{
"rel": "child",
"href": "https://iavnqy-dev1.fa.ocs.oraclecloud.com:443/hcmRestApi/resources/11.13.18.05/workers/00020000000EACED00057708000110D9320279290000004AACED00057372000D6A6176612E73716C2E4461746514FA46683F3566970200007872000E6A6176612E7574696C2E44617465686A81014B5974190300007870770800000191E387980078/child/emails",
"name": "emails",
"kind": "collection"
},
{
"rel": "child",
"href": "https://iavnqy-dev1.fa.ocs.oraclecloud.com:443/hcmRestApi/resources/11.13.18.05/workers/00020000000EACED00057708000110D9320279290000004AACED00057372000D6A6176612E73716C2E4461746514FA46683F3566970200007872000E6A6176612E7574696C2E44617465686A81014B5974190300007870770800000191E387980078/child/ethnicities",
"name": "ethnicities",
"kind": "collection"
},
{
"rel": "child",
"href": "https://iavnqy-dev1.fa.ocs.oraclecloud.com:443/hcmRestApi/resources/11.13.18.05/workers/00020000000EACED00057708000110D9320279290000004AACED00057372000D6A6176612E73716C2E4461746514FA46683F3566970200007872000E6A6176612E7574696C2E44617465686A81014B5974190300007870770800000191E387980078/child/externalIdentifiers",
"name": "externalIdentifiers",
"kind": "collection"
},
{
"rel": "child",
"href": "https://iavnqy-dev1.fa.ocs.oraclecloud.com:443/hcmRestApi/resources/11.13.18.05/workers/00020000000EACED00057708000110D9320279290000004AACED00057372000D6A6176612E73716C2E4461746514FA46683F3566970200007872000E6A6176612E7574696C2E44617465686A81014B5974190300007870770800000191E387980078/child/legislativeInfo",
"name": "legislativeInfo",
"kind": "collection"
},
{
"rel": "child",
"href": "https://iavnqy-dev1.fa.ocs.oraclecloud.com:443/hcmRestApi/resources/11.13.18.05/workers/00020000000EACED00057708000110D9320279290000004AACED00057372000D6A6176612E73716C2E4461746514FA46683F3566970200007872000E6A6176612E7574696C2E44617465686A81014B5974190300007870770800000191E387980078/child/messages",
"name": "messages",
"kind": "collection"
},
{
"rel": "child",
"href": "https://iavnqy-dev1.fa.ocs.oraclecloud.com:443/hcmRestApi/resources/11.13.18.05/workers/00020000000EACED00057708000110D9320279290000004AACED00057372000D6A6176612E73716C2E4461746514FA46683F3566970200007872000E6A6176612E7574696C2E44617465686A81014B5974190300007870770800000191E387980078/child/names",
"name": "names",
"kind": "collection"
},
{
"rel": "child",
"href": "https://iavnqy-dev1.fa.ocs.oraclecloud.com:443/hcmRestApi/resources/11.13.18.05/workers/00020000000EACED00057708000110D9320279290000004AACED00057372000D6A6176612E73716C2E4461746514FA46683F3566970200007872000E6A6176612E7574696C2E44617465686A81014B5974190300007870770800000191E387980078/child/nationalIdentifiers",
"name": "nationalIdentifiers",
"kind": "collection"
},
{
"rel": "child",
"href": "https://iavnqy-dev1.fa.ocs.oraclecloud.com:443/hcmRestApi/resources/11.13.18.05/workers/00020000000EACED00057708000110D9320279290000004AACED00057372000D6A6176612E73716C2E4461746514FA46683F3566970200007872000E6A6176612E7574696C2E44617465686A81014B5974190300007870770800000191E387980078/child/otherCommunicationAccounts",
"name": "otherCommunicationAccounts",
"kind": "collection"
},
{
"rel": "child",
"href": "https://iavnqy-dev1.fa.ocs.oraclecloud.com:443/hcmRestApi/resources/11.13.18.05/workers/00020000000EACED00057708000110D9320279290000004AACED00057372000D6A6176612E73716C2E4461746514FA46683F3566970200007872000E6A6176612E7574696C2E44617465686A81014B5974190300007870770800000191E387980078/child/passports",
"name": "passports",
"kind": "collection"
},
{
"rel": "child",
"href": "https://iavnqy-dev1.fa.ocs.oraclecloud.com:443/hcmRestApi/resources/11.13.18.05/workers/00020000000EACED00057708000110D9320279290000004AACED00057372000D6A6176612E73716C2E4461746514FA46683F3566970200007872000E6A6176612E7574696C2E44617465686A81014B5974190300007870770800000191E387980078/child/phones",
"name": "phones",
"kind": "collection"
},
{
"rel": "child",
"href": "https://iavnqy-dev1.fa.ocs.oraclecloud.com:443/hcmRestApi/resources/11.13.18.05/workers/00020000000EACED00057708000110D9320279290000004AACED00057372000D6A6176612E73716C2E4461746514FA46683F3566970200007872000E6A6176612E7574696C2E44617465686A81014B5974190300007870770800000191E387980078/child/photos",
"name": "photos",
"kind": "collection"
},
{
"rel": "child",
"href": "https://iavnqy-dev1.fa.ocs.oraclecloud.com:443/hcmRestApi/resources/11.13.18.05/workers/00020000000EACED00057708000110D9320279290000004AACED00057372000D6A6176612E73716C2E4461746514FA46683F3566970200007872000E6A6176612E7574696C2E44617465686A81014B5974190300007870770800000191E387980078/child/religions",
"name": "religions",
"kind": "collection"
},
{
"rel": "child",
"href": "https://iavnqy-dev1.fa.ocs.oraclecloud.com:443/hcmRestApi/resources/11.13.18.05/workers/00020000000EACED00057708000110D9320279290000004AACED00057372000D6A6176612E73716C2E4461746514FA46683F3566970200007872000E6A6176612E7574696C2E44617465686A81014B5974190300007870770800000191E387980078/child/visasPermits",
"name": "visasPermits",
"kind": "collection"
},
{
"rel": "child",
"href": "https://iavnqy-dev1.fa.ocs.oraclecloud.com:443/hcmRestApi/resources/11.13.18.05/workers/00020000000EACED00057708000110D9320279290000004AACED00057372000D6A6176612E73716C2E4461746514FA46683F3566970200007872000E6A6176612E7574696C2E44617465686A81014B5974190300007870770800000191E387980078/child/workRelationships",
"name": "workRelationships",
"kind": "collection"
},
{
"rel": "child",
"href": "https://iavnqy-dev1.fa.ocs.oraclecloud.com:443/hcmRestApi/resources/11.13.18.05/workers/00020000000EACED00057708000110D9320279290000004AACED00057372000D6A6176612E73716C2E4461746514FA46683F3566970200007872000E6A6176612E7574696C2E44617465686A81014B5974190300007870770800000191E387980078/child/workersDFF",
"name": "workersDFF",
"kind": "collection"
},
{
"rel": "child",
"href": "https://iavnqy-dev1.fa.ocs.oraclecloud.com:443/hcmRestApi/resources/11.13.18.05/workers/00020000000EACED00057708000110D9320279290000004AACED00057372000D6A6176612E73716C2E4461746514FA46683F3566970200007872000E6A6176612E7574696C2E44617465686A81014B5974190300007870770800000191E387980078/child/workersEFF",
"name": "workersEFF",
"kind": "collection"
}
]
}
],
"count": 1,
"hasMore": false,
"limit": 25,
"offset": 0,
"links": [
{
"rel": "self",
"href": "https://iavnqy-dev1.fa.ocs.oraclecloud.com:443/hcmRestApi/resources/11.13.18.05/workers",
"name": "workers",
"kind": "collection"
}
]
} -
Perform a PATCH operation on this URL by providing the new manager information in the request body.
/hcmRestApi/resources/11.13.18.05/workers/{workersUniqID}/child/workRelationships/{PeriodOfServiceId}/child/assignments/{assignmentsUniqID}/child/managers/{managersUniqID}
Example PATCH request body to change an employee's manager:
{
"ActionCode": "MANAGER_CHANGE",
"ManagerAssignmentNumber": "E955160008191552",
"ManagerType": "LINE_MANAGER"
}
Example Response from OracleHCM:
{
"AssignmentSupervisorId": 598504,
"EffectiveStartDate": "2019-06-11",
"EffectiveEndDate": "4712-12-31",
"ManagerAssignmentId": 300100180052435,
"ManagerAssignmentNumber": "E955160008191552",
"ManagerType": "LINE_MANAGER",
"ActionCode": "MANAGER_CHANGE",
"ReasonCode": null,
"CreatedBy": "HCM_INTEGRATION_SPEC",
"CreationDate": "2019-06-07T15:36:27.784+00:00",
"LastUpdatedBy": "HCM_INTEGRATION_SPEC",
"LastUpdateDate": "2019-06-11T18:34:58.437+00:00",
"links": [...]
}